<!DOCTYPE html>
<html>
<head>
<title>基层季报-审核</title>
<div th:include="base-libs :: base-libs" />
<script th:src="@{/tbxt/js/bbsh.js}"></script>

<meta name="content-type" content="text/html; charset=UTF-8">
<style>
	body {
		background: #fff;
		overflow: hidden;
		text-align: center;
	}
	.titleTd{
		width:20%;
	}
	.laydate-icon{
		line-height: 28px;
		background-color: #fff;
		height: 28px;
		border: 1px solid #B6B6B6;
		border-radius: 5px;
		width:30% !important;
	}
</style>
</head>
<script>
	var bbshData = StoreCache.removeCache('bbshData');
	$(function() {
        $(this).registerManagerPage({cacheTables:["TB_ZY_BBZT"],callback:initData});
		initView();
	})
	/*数据查询*/
	function initData(){
		if(!$.isEmptyObject(bbshData)){
			$.QuickRemote.AjaxJson(contextRoot + "jcjb/queryOne", queryNbInfoHandler, {ID: bbshData.ID});
		}else{
			btnController();
		}
	}
	/*数据回调*/
	function queryNbInfoHandler(result){
		$(".form-control").each(function(){
			var name = $(this).attr('name');
			$(this).val(result[name]);
		})
		format(result['SFTGZYYFW']);
		btnController(result.ZT);
	}
	function initView() {
		$("input,select").attr("disabled",'disabled');
		
		//审核不通过
		$("body").on('click','#btnShbtg',function(){
			checkPass();
		});
		
		//审核通过
		$("body").on('click','#btnShtg',function(){
			checkNoPass();
		});
		
		//返回
		$("body").on('click','#btnFh',function(){
			StoreCache.setCache('bbshTabIndex',0);
			$.QuickUrlUtils.redirectUrl("bbsh.html");
		});
		
		//审核记录
		$("body").on('click','#btnShjl',function(){
			StoreCache.setCache("BBID", bbshData.ID);
			openShjlView();
		});
	}
	
	function format(flag){
		if(flag=='1'){
			$(".shi").prop("checked",'true');
		}else if(flag=='0'){
			$(".fou").prop("checked",'true');
		}
		var zt = $("#ZT").val();
        var bbztArr = StoreCache.getCache("TB_ZY_BBZT");
        if(!$.isEmptyObject(bbztArr) && !$.isEmptyObject(bbztArr = bbztArr.data)){
            var bbzt = "未填报";
            $.each(bbztArr, function(i,item){
                if(item.XMDM == zt){
                    bbzt = item.XMMC;
                    return false;
                }
            })
            $("#SHZT").val(bbzt);
        }

		if (zt == '1' || zt == '3') {
			$("#south").hide();
		} else{
			$("#south").show();
		}
		 $('body').layout("resize");
	}
	
</script>
<body class="easyui-layout">
	<form id="queryForm" action="save">
	 	<input class="form-control" type="hidden" id="SFTGZYYFW" /> 
	    <input class="form-control" type="hidden" id="ID" name="ID"/> 
	    <input class="form-control" type="hidden" id="ZT" name="ZT" />
		<input class="form-control" type="hidden" id="YLJGID" name="YLJGID"/> 
		<input class="form-control" type="hidden" id="JGLB" name="JGLB"/> 
		<input class="form-control" type="hidden" id="XZQH" name="XZQH"/>
		<div region="north" style="height:60px;border:0;border-bottom:1px solid #ddd">
		<table class="form-table">
			<tr>
				<td class="td-text">审核状态：</td>
				<td class="td-content">
					<input id="SHZT" name="SHZT" class="form-control" readonly="readonly">
				</td>
				<td class="td-text">机构名称：</td>
				<td class="td-content">
					<input id="JGMC" name="JGMC" class="form-control" readOnly="readOnly">
				</td>
				<td class="td-text"><label>年份：</label></td>
				<td class="td-content">
					<input type="text" id="NF" name="NF" class="form-control laydate-icon" />
					<select id="JD" name="JD" style="width:40%" class="form-control">
						<option value=""></option>
						<option value="1">第一季度</option>
						<option value="2">第二季度</option>
						<option value="3">第三季度</option>
						<option value="4">第四季度</option>
					</select>
				</td>
				<td>
					<button id="btnShjl" class="btn btn-info" type="button">审核记录</button>
				</td>
			</tr>
		</table>
		</div>
		<div region="center" border="false">
		<table class="form-table">
			<tr>
				<td class="td-text titleTd"><label>1.是否开展家庭医生签约：</label></td>
				<td class="td-content" style="line-height:26px!important;">
					<input style="width:18px;float:left" type="radio" class="mycheck shi" name="SFKZJTYSQY" value="1" checked="checked">
					<span style="float:left;margin-right:15px">是</span>

					<input class="mycheck fou" style="width:18px;float:left" type="radio" name="SFKZJTYSQY" value="0" />
					<span style="float:left">否</span>
				</td>
				<td class="td-text titleTd"><label>2.辖区户籍人口数：</label></td>
				<td class="td-content">
					<input id="XQHJRKS" name="XQHJRKS" class="form-control" type="text"
						   quick-config="label:'辖区户籍人口数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text titleTd"><label>3.辖区家庭户数：</label></td>
				<td class="td-content">
					<input id="XQJTHS" name="XQJTHS" class="form-control"
						   quick-config="label:'辖区家庭户数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>4.普通人群数：</label></td>
				<td class="td-content">
					<input id="PTRQS" name="PTRQS" class="form-control"
						   quick-config="label:'普通人群数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>5.重点人群数：</label></td>
				<td class="td-content">
					<input id="ZDRQS" name="ZDRQS" class="form-control"
						   quick-config="label:'重点人群数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>6.65岁以上老年人数：</label></td>
				<td class="td-content">
					<input id="LNRRS" name="LNRRS" class="form-control dataField"
						   quick-config="label:'65岁以上老年人数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>7.慢病人群数：</label></td>
				<td class="td-content">
					<input id="MBRQS" name="MBRQS" class="form-control"
						   quick-config="label:'慢病人群数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>8.高血压人数：</label></td>
				<td class="td-content">
					<input id="GXYRS" name="GXYRS" class="form-control dataField"
						   quick-config="label:'高血压人数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>9.糖尿病人数：</label></td>
				<td class="td-content">
					<input id="TNBRS" name="TNBRS" class="form-control"
						   quick-config="label:'糖尿病人数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>10.结核病人数：</label></td>
				<td class="td-content">
					<input id="JHBRS" name="JHBRS" class="form-control dataField" type="text"
						   quick-config="label:'结核病人数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>11.脑卒中人数：</label></td>
				<td class="td-content">
					<input id="NCZRS" name="NCZRS" class="form-control"
						   quick-config="label:'脑卒中人数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>12.冠心病人数：</label></td>
				<td class="td-content">
					<input id="GXBRS" name="GXBRS" class="form-control dataField" type="text"
						   quick-config="label:'冠心病人数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>13.孕产妇人数：</label></td>
				<td class="td-content">
					<input id="YCFRS" name="YCFRS" class="form-control dataField"
						   quick-config="label:'孕产妇人数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>14.0~6岁儿童数：</label></td>
				<td class="td-content">
					<input id="ETS" name="ETS" class="form-control"
						   quick-config="label:'0~6岁儿童数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>15.残疾人数：</label></td>
				<td class="td-content">
					<input id="CJRS" name="CJRS" class="form-control dataField" type="text"
						   quick-config="label:'残疾人数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>16.严重精神障碍人群数：</label></td>
				<td class="td-content">
					<input id="YZJSZARQS" name="YZJSZARQS" class="form-control"
						   quick-config="label:'严重精神障碍人群数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>17.计划生育特殊家庭数：</label></td>
				<td class="td-content">
					<input id="JHSYTSJTRS" name="JHSYTSJTRS" class="form-control"
						   quick-config="label:'计划生育特殊家庭数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>18.贫困人口：</label></td>
				<td class="td-content">
					<input id="PKRS" name="PKRS" class="form-control dataField" type="text"
						   quick-config="label:'贫困人口', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>19.流动人口：</label></td>
				<td class="td-content">
					<input id="LDRK" name="LDRK" class="form-control"
						   quick-config="label:'流动人口', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>20.家庭医生团队个数：</label></td>
				<td class="td-content">
					<input id="JTYSTDS" name="JTYSTDS" class="form-control dataField" type="text"
						   quick-config="label:'家庭医生团队个数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>21.团队中全科医生数：</label></td>
				<td class="td-content">
					<input id="QKYSS" name="QKYSS" class="form-control"
						   quick-config="label:'团队中全科医生数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>22.专科医生数：</label></td>
				<td class="td-content">
					<input id="ZKYSS" name="ZKYSS" class="form-control dataField" type="text"
						   quick-config="label:'专科医生数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>23.乡村医生数：</label></td>
				<td class="td-content">
					<input id="XCYSS" name="XCYSS" class="form-control"
						   quick-config="label:'乡村医生数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>24.护士数：</label></td>
				<td class="td-content">
					<input id="HSS" name="HSS" class="form-control dataField" type="text"
						   quick-config="label:'护士数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>25.公卫人员数：</label></td>
				<td class="td-content">
					<input id="GWRYS" name="GWRYS" class="form-control"
						   quick-config="label:'公卫人员数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>26.多点执业或返聘医师人数：</label></td>
				<td class="td-content">
					<input id="DDZYHFPYSRS" name="DDZYHFPYSRS" class="form-control dataField" type="text"
						   quick-config="label:'多点执业或返聘医师人数', validateProxy:'notNull length num', length: '10'" />
				</td>
				<td class="td-text"><label>27.其他人员数：</label></td>
				<td class="td-content">
					<input id="QTRS" name="QTRS" class="form-control"
						   quick-config="label:'其他人员数', validateProxy:'notNull length num', length: '10'" />
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>28.是否提供中医药服务：</label></td>
				<td class="td-content" style="line-height:26px!important;">
					<input style="width:18px;float:left" type="radio" class="mycheck shi" name="SFTGZYYFW" value="1" checked="checked">
					<span style="float:left;margin-right:15px">是</span>
					<input class="mycheck fou" style="width:18px;float:left" type="radio" name="SFTGZYYFW" value="0" />
					<span style="float:left">否</span>
				</td>
			</tr>
		</table>
		</div>
	</form>
	<div region="south" id="south" style="height:45px;line-height:40px;text-align:center;border:0;border-top:1px solid #ddd">
	</div>

</body>
<script type="text/html" id="shBtnBox">
	<button id="btnShbtg" class="btn btn-info" type="button">审核不通过</button>
	<button id="btnShtg" class="btn btn-info" type="button">审核通过</button>
	<button id="btnFh" class="btn btn-info" type="button">返回</button>
</script>
</html>
